<?php


namespace app\validate;
use think\facade\Cache;
use think\validate;


class MyBaseValidate extends validate
{
    /**
    自定义公用类方法
     */
    public function checkWebVDCode($value, $rule, $data=[], $strName, $msg) {
        if ($value == Cache::get('validateCode')) {
            return true;
        } else {
            return $msg = '验证码过期或失效';
        }
    }
}